package com.hzf.material.rpc.api;

import com.github.wenhao.geohash.domain.GeoRange;
import com.hzf.material.dao.model.*;

import java.util.List;

/**
 * describe: TODO
 * creat_user: 白开水
 * creat_time: 2017/11/18   8:50
 **/
public interface MaterialApiService {
    List<MaterialArea> selectByExample(MaterialAreaExample materiaAreaExample);

    List<MaterialList> selectByExample(MaterialListExample materialListExample);

    List<MaterialListType> selectByExample(MaterialListTypeExample materialListTypeExample);

    MaterialShop selectByExample(MaterialShopExample materialShopExample);

    List<MaterialGoodsModelPin> selectByExample(MaterialGoodsModelPinExample materialGoodsModelPinExample);

    List<MaterialGoodsModel> selectByExample(MaterialGoodsModelExample materialGoodsModelExample);

    List<MaterialGoodsPic> selectByExample(MaterialGoodsPicExample materialGoodsPicExample);

    List<MaterialGoods> selectByExample(MaterialGoodsExample materialGoodsExample);

    List<MaterialGoodsTypeBig> selectByExample(MaterialGoodsTypeBigExample materialGoodsTypeBigExample);

    List<MaterialGoodsTypeMiddle> selectByExample(MaterialGoodsTypeMiddleExample materialGoodsTypeMiddleExample);

    List<MaterialGoodsTypeSmall> selectByExample(MaterialGoodsTypeSmallExample materialGoodsTypeSmallExample);

    int installShop(MaterialShop materialShop);
    MaterialGoods installGoods(MaterialGoods materialGoods);
    MaterialGoodsModel installGoodsModel(MaterialGoodsModel materialGoodsModel);
    MaterialGoodsModelPin installGoodsPin(MaterialGoodsModelPin materialGoodsModelPin);
    List<MaterialGoods> selectGoodsByExampleForOffsetPage(MaterialGoodsExample example, Integer offset, Integer limit);
    long countGoodsByExample(MaterialGoodsExample example);
    MaterialGoods selectByGoods(MaterialGoodsExample example);
    MaterialGoodsModelPin selectModelPin(MaterialGoodsModelPinExample materialGoodsModelPinExample);
    MaterialGoodsTypeMiddle selectMiddle(MaterialGoodsTypeMiddleExample materialGoodsTypeMiddleExample);
    MaterialGoodsTypeSmall selectSmall(MaterialGoodsTypeSmallExample materialGoodsTypeSmallExample);
    MaterialGoodsTypeBig selectBig(MaterialGoodsTypeBigExample materialGoodsTypeBigExample);
    int updateGoods(MaterialGoods materialGoods);
    int updateGoodsModel(MaterialGoodsModel materialGoodsModel);
    int delectModels(MaterialGoodsModelExample materialGoodsModelExample);

    int delectGoods(int id);
    int updateGoodsModelPin(MaterialGoodsModelPin materialGoodsModelPinExample);
    int delectGoodsModelPin(MaterialGoodsModelPinExample materialGoodsModelPinExample);

    List<MaterialGoods> selectByPrimaryCity(MaterialGoodsExample  example,int offset,int limit);
    List<MaterialGoods> selectByPrimaryDistance(int regionNumber,int typeId,int status,  long min0, long max0,
                                                long min1, long max1, long min2, long max2,
                                                long min3, long max3,
                                                long min4, long max4,
                                                long min5, long max5,
                                                long min6, long max6,
                                                long min7, long max7,
                                                long min8,long max8);

    int countByCityExample(MaterialGoodsExample example);

}
